{load href="__plugin__/admin/public.css,__plugin__/admin/public.js"}
<form class="layui-form layui-form-pane edit-form">
        <input name="id" type="hidden" value="{$data['id']}"/>
    <div class="layui-tab layui-tab-card">
      <ul class="layui-tab-title">
        <li class="layui-this">任务详情</li>
        <li>接单列表</li>
      </ul>
      <div class="layui-tab-content" >
        <div class="layui-tab-item layui-show">
            <div class="layui-form-item">
                <label class="layui-form-label">
                    任务名称
                </label>
                <div class="layui-input-block">
                    <input autocomplete="off" class="layui-input"  name="title" type="text" value="{$data['title']}"  lay-verify="required"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">
                    任务链接
                </label>
                <div class="layui-input-block">
                    <input autocomplete="off" class="layui-input" name="url" type="text" value="{$data['url']}" />
                </div>
            </div>
           
            <div class="layui-form-item">
                <label class="layui-form-label">
                    有效时长
                </label>
                <div class="layui-input-inline">
                    <input autocomplete="off" class="layui-input" name="hours" type="number" value="{$data['hours']}" lay-verify="required" {if $data['id']} readonly="" {/if} />
                </div>
                <div class="layui-form-mid layui-word-aux">单位：小时</div>
            </div>
          
            <div class="layui-form-item">
                <label class="layui-form-label">
                    任务名额
                </label>
                <div class="layui-input-block">
                    <input autocomplete="off" class="layui-input" name="number" type="number" value="{$data['number']}" {if $data['id']} readonly="readonly"{/if} lay-verify="required" />
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">
                    任务描述
                </label>
                <div class="layui-input-block">
                    <textarea  class="layui-textarea" name="remark">{$data['remark']}</textarea>
                </div>
            </div>
             <div class="layui-form-item layui-form-text">
                {:upload_start(9,'点击此处上传任务图片')}
                {if $data['image']}
                {volist name="$data['image']" id="vo"}
                {:image_div($vo,$data['id'])}
                {/volist}
                {/if}
                {:upload_end()}
            </div>
            {if $data['id']}
                <div class="layui-form-item">
                    <label class="layui-form-label">
                       状态
                    </label>
                    <div class="layui-input-block">
                        {switch name="$data['status']"}
                        {case value="1"} <input autocomplete="off" class="layui-input"  type="text" value="待审核" readonly="readonly" />{/case}
                        {case value="2"} <input autocomplete="off" class="layui-input"  type="text" value="待接单" readonly="readonly" />{/case}
                        {case value="3"} <input autocomplete="off" class="layui-input"  type="text" value="待完成" readonly="readonly" />{/case}
                        {case value="4"} <input autocomplete="off" class="layui-input"  type="text" value="已完成" readonly="readonly" />{/case}
                        {case value="5"} <input autocomplete="off" class="layui-input"  type="text" value="已取消" readonly="readonly" />{/case}
                        {/switch}
                    </div>
                </div>
                 <div class="layui-form-item">
                    <label class="layui-form-label">
                     发布时间
                    </label>
                    <div class="layui-input-block">
                        <input autocomplete="off" class="layui-input"  type="text" value="{$data['add_time']|date='Y-m-d H:i:s',###}" readonly="readonly" />
                    </div>
                </div>
                {if $data['status'] == 4}
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        完成时间
                    </label>
                    <div class="layui-input-block">
                        <input autocomplete="off" class="layui-input"  type="text" value="{$data['finish_time']|date='Y-m-d H:i:s',###}" readonly="readonly" />
                    </div>
                </div>
                {/if}
            {/if}
           
            
            <div class="layui-form-item">
                <label class="layui-form-label">
                排序
                </label>
                <div class="layui-input-inline">
                    <input autocomplete="off" class="layui-input" name="sort" type="text" value="{$data['sort']}" />
                </div>
                <div class="layui-form-mid layui-word-aux">默认为0</div>
            </div>
        </div>
        
        <div class="layui-tab-item">
            {volist name="order" id="vo" empty="暂无接单"}
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <img src="{$vo['photo_path']}" style="width:30px;height:30px;border-radius:50%" onerror="this.src='/image/user.png'">
                    </div>
                    <div class="layui-inline" style="padding-right:10px">
                        接单人：{$vo['nick_name']|default=$vo['account']}
                    </div>
                    <div class="layui-inline"  style="padding:10px">
                        订单状态：
                         {switch name="$vo['status']"}
                            {case value="1"}待提交{/case}
                            {case value="2"}待审核{/case}
                            {case value="3"}审核通过{/case}
                            {case value="4"}审核驳回{/case}
                        {/switch}
                    </div>
                    <div class="layui-inline"  >
                        接单时间：
                        {$vo['add_time']|date="Y-m-d",###}
                    </div>
                </div>
            {/volist}
        </div>
      </div>
    </div>
   
    
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-filter="editform" lay-submit="">
                保存
            </button>
            <button class="layui-btn layui-btn-primary layui-btn-cancel" type="button">
                取消
            </button>
        </div>
    </div>
</form>


